package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 优惠券兑换码
 * </p>
 *
 * @author zhuqipeng
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("coupon_codes")
@ApiModel(value="CouponCodeEntity", description="优惠券兑换码")
public class CouponCodeEntity implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String batchNum;

    private String code;

    @TableField("is_take")
    private Boolean take;
    
    private Long couponId;
    
    private Long cinemaId;

    private Long tenantId;

    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updatedAt;

    @TableField(select = false)
    @TableLogic(value = "null", delval = "now()")
    public LocalDateTime deletedAt;

    @TableField(exist = false)
    private CouponEntity coupon;
}
